$(function(){
    $(".nav").on("click","li>a",function (e){
        e.preventDefault();
        $(this).closest("ul").children().removeClass("active");
        $(this).closest("li").addClass("active");
        let href = $(this).attr("href");
        $(".main>iframe").attr("src",href);
    });
    $(".logout>a").click(function (e){
       e.preventDefault();
        location.href=ctx + "/user/logout";
    });
    //点击修改个人信息，layer弹窗
    $("#edit-btn").click(function () {
        layer.open({
            type: 2,
            title: '修改个人信息',
            shadeClose: true,
            shade: false,
            area: ['600px', '500px'],
            content: ctx + '/user/edit'
        });
    });
});